<head>
    <title>作业一</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
    <!-- and it's easy to individually load additional languages -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/languages/go.min.js"></script>
    <script>hljs.initHighlightingOnLoad();</script>
</head>
<pre>
    <code class="language-python">
from datetime import datetime

def log_it(logFile='out.log'):
    def outter_wrapper(func):
        def inner_wrapper(*args, **kwargs):
            log = f"[{datetime.now()}]: {func.__name__}\n"
            with open(logFile, "a") as f:
                f.write(log)
            return func(*args, **kwargs)
        return inner_wrapper
    return outter_wrapper

@log_it()
def login(client, addr):
    print("%s from %s logined" % (client, addr))

@log_it(logFile="register.log")
def register(username, password):
    print("User(%s, %s) registered" % (username, password))

if __name__ == "__main__":
    client = "ayachinene0721"
    addr = "127.0.0.1:0721"
    username = "绫地宁宁"
    password = "0721"
    register(username, password)
    login(client, addr)
    </code>
</pre>